package com.atcc.demo.config;


import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.atcc.demo.domain.TestFilter;

@Configuration
public class FilterConfig {

	@Bean
	public FilterRegistrationBean<TestFilter> registFilter(){
		FilterRegistrationBean<TestFilter> filterRegist = new FilterRegistrationBean<>();
		filterRegist.addUrlPatterns("/**");
		filterRegist.setFilter(new TestFilter());
		filterRegist.setName("TestFilter");
		filterRegist.setOrder(1);
		return filterRegist;
	}
}
